Web Services for Remote Management  14.0
Reference documentation for web service interfaces to support remote management of Symantec Endpoint Protection
List of all members | Static Public Member Functions | Static Public Attributes
com.symantec.sepm.webservice.client.ClientServiceHelper Class Reference

Provides helper functionality for the ClientService API. More...

Static Public Member Functions

static RiskEventFilter createRiskEventFilter (String commandID)
 Create a RiskEventFilter object. More...
 
static RiskEventResult createRiskEventResult (List< RiskEventTO > riskEventlist, PagingOptionsTO pagingOptionsTO, Context context, Long totalRiskEventCount) throws ServiceException
 Creates a RiskEventResult object. More...
 
static void validateIPAddresses (String[] ipAddresses) throws InvalidArgumentServiceException
 Validates the specified IP addresses. More...
 
static ComputerResult createComputerResult (List< ComputerTO > computerTOList, PagingOptionsTO pagingOptionsTO, Context context, long totalComputerCount) throws ServiceException
 Creates a ComputerResult object that contains a list of valid Computer objects. More...
 
static void validateHostNames (String[] computerHostNames) throws InvalidArgumentServiceException
 Validates the specified hostnames. More...
 
static GroupResult createGroupsResult (List< ClientGroupTO > groups, PagingOptionsTO pagingOptionsTO, Context context, long totalClientGroupCount) throws ServiceException
 Creates a GroupResult object that contains a list of valid Group objects. More...
 
static String getNameFromPath (String fullPath)
 Returns the group name from the full path of the group. More...
 
static ClientGroupTO createClientGroupTO (Group group)
 Creates a ClientGroup transfer object that contains information from a ClientService Group object. More...
 
static String validateAndReconstructGroupPath (String groupPath) throws InvalidArgumentServiceException
 Validates the group path parameter of the ClientService.getGroupsByName method. More...
 
static Computer createComputer (ComputerTO computerTO)
 Creates a Computer object from the specified Computer transfer object. More...
 
static Group createGroup (ClientGroupTO clientGroupTO)
 Creates a Group object from the specified ClientGroup transfer object. More...
 
static void validateEventGUIDs (String[] eventIds) throws InvalidArgumentServiceException, InvalidArgumentException
 Validates the given GUID and throws an InvalidArgumentServiceException if it is invalid. More...
 

Static Public Attributes

static final String GROUP_DELIMITERS = "/\\"
 Delimiters used to separate group names. More...
 
static final String GROUP_DELIMITERS_IN_DB = "\\"
 Delimiter used to separate group names in the database. More...
 
static final int GROUPPATH_MAXLENGTH = 1000
 Maximum group path length. More...
 

Detailed Description

Provides helper functionality for the ClientService API.

This class validates input parameters and populates transfer objects and filter objects. Additional validation is provided by other classes.

See also
IpValidator
HostNameValidator
GroupNameValidator
GUIDValidator See also the other classes in the validation package.

Member Function Documentation

static RiskEventFilter com.symantec.sepm.webservice.client.ClientServiceHelper.createRiskEventFilter ( String  commandID)
static

Create a RiskEventFilter object.

Parameters
commandIDcommand GUID
Returns
a RiskEventFilter object
static RiskEventResult com.symantec.sepm.webservice.client.ClientServiceHelper.createRiskEventResult ( List< RiskEventTO >  riskEventlist,
PagingOptionsTO  pagingOptionsTO,
Context  context,
Long  totalRiskEventCount 
) throws ServiceException
static

Creates a RiskEventResult object.

Parameters
riskEventlistlist of risk event clients
pagingOptionsTOtransfer object that contains pagination information for returned result sets.
contextobject that provides the starting index for multiple sets of results
totalRiskEventCountthe total number of results available in the returned RiskEventResult object
Returns
a RiskEventResult transfer object that is then populated with the results that are returned from the RiskEventTO list
Exceptions
ServiceExceptionif more results are returned than are accounted for by the pagingOptionsTO parameter and the context parameter
static void com.symantec.sepm.webservice.client.ClientServiceHelper.validateIPAddresses ( String[]  ipAddresses) throws InvalidArgumentServiceException
static

Validates the specified IP addresses.

Parameters
ipAddresseslist of IP addresses for which to provide computer GUIDs
Exceptions
InvalidArgumentServiceExceptionif the computerGUID list is null or empty or if any IP address is invalid
static ComputerResult com.symantec.sepm.webservice.client.ClientServiceHelper.createComputerResult ( List< ComputerTO >  computerTOList,
PagingOptionsTO  pagingOptionsTO,
Context  context,
long  totalComputerCount 
) throws ServiceException
static

Creates a ComputerResult object that contains a list of valid Computer objects.

If a specified IP address or hostname is not found, this information is not provided in the ComputerResult object.

Parameters
computerTOListlist of computers that match the specified IP addresses or hostnames
pagingOptionsTOtransfer object that contains pagination information for returned result sets
contextobject that provides the starting index for multiple sets of results
totalComputerCounttotal number of computers found for the specified IP addresses or hostnames
Returns
a ComputerResult object that contains a list of valid Computer objects
Exceptions
ServiceExceptionif the web service encountered an error processing the web request
static void com.symantec.sepm.webservice.client.ClientServiceHelper.validateHostNames ( String[]  computerHostNames) throws InvalidArgumentServiceException
static

Validates the specified hostnames.

Parameters
computerHostNameslist of hostnames for which to provide computer GUIDs
Exceptions
InvalidArgumentServiceExceptionif both the network domain name and the hostname are null or empty
static GroupResult com.symantec.sepm.webservice.client.ClientServiceHelper.createGroupsResult ( List< ClientGroupTO >  groups,
PagingOptionsTO  pagingOptionsTO,
Context  context,
long  totalClientGroupCount 
) throws ServiceException
static

Creates a GroupResult object that contains a list of valid Group objects.

Parameters
groupslist of ClientGroup transfer objects that match the specified group names
pagingOptionsTOtransfer object that contains pagination information for returned result sets
contextobject that provides the starting index for multiple sets of results
totalClientGroupCounttotal number of groups found for the specified group names
Returns
a GroupsResult object that contains a list of valid Group objects
Exceptions
ServiceExceptionif the web service encountered an error processing the web request
static String com.symantec.sepm.webservice.client.ClientServiceHelper.getNameFromPath ( String  fullPath)
static

Returns the group name from the full path of the group.

Parameters
fullPathfull path that is parsed to provide the group name
Returns
group name
static ClientGroupTO com.symantec.sepm.webservice.client.ClientServiceHelper.createClientGroupTO ( Group  group)
static

Creates a ClientGroup transfer object that contains information from a ClientService Group object.

Parameters
groupthe Group object from which to copy. If this parameter is null, a default ClientGroupTO object is created.
Returns
a ClientGroup transfer object constructed from the specified Group object
static String com.symantec.sepm.webservice.client.ClientServiceHelper.validateAndReconstructGroupPath ( String  groupPath) throws InvalidArgumentServiceException
static

Validates the group path parameter of the ClientService.getGroupsByName method.

The group path is reconstructed according to the following rules:

  • all forward slashes ("/") are replaced with backslashes ("\")
  • any forward slashes or backslashes at the beginning or end of the group path are removed
  • any duplicate backslashes in the group path are removed
See also
GroupNameValidator
Parameters
groupPathgroup path to validate
Returns
reconstructed group path
Exceptions
InvalidArgumentServiceExceptionif the group path is invalid
static Computer com.symantec.sepm.webservice.client.ClientServiceHelper.createComputer ( ComputerTO  computerTO)
static

Creates a Computer object from the specified Computer transfer object.

Parameters
computerTOtransfer object from which to create the Computer object
Returns
the Computer object
static Group com.symantec.sepm.webservice.client.ClientServiceHelper.createGroup ( ClientGroupTO  clientGroupTO)
static

Creates a Group object from the specified ClientGroup transfer object.

Parameters
clientGroupTOtransfer object from which to create the Group object
Returns
the Group object
static void com.symantec.sepm.webservice.client.ClientServiceHelper.validateEventGUIDs ( String[]  eventIds) throws InvalidArgumentServiceException, InvalidArgumentException
static

Validates the given GUID and throws an InvalidArgumentServiceException if it is invalid.

A GUID is considered to be valid if it contains only alphanumeric characters and is exactly 32 characters long.

Parameters
eventIds
Exceptions
InvalidArgumentServiceExceptionif the given GUID is invalid

Member Data Documentation

final String com.symantec.sepm.webservice.client.ClientServiceHelper.GROUP_DELIMITERS = "/\\"
static

Delimiters used to separate group names.

Forward slash or backslash are allowed.

final String com.symantec.sepm.webservice.client.ClientServiceHelper.GROUP_DELIMITERS_IN_DB = "\\"
static

Delimiter used to separate group names in the database.

Only the backslash character is allowed.

final int com.symantec.sepm.webservice.client.ClientServiceHelper.GROUPPATH_MAXLENGTH = 1000
static

Maximum group path length.